package com.xiaoer.studyenglishdemo.ui;

import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.xiaoer.studyenglishdemo.R;
import com.xiaoer.studyenglishdemo.bean.WordBean;
import com.xiaoer.studyenglishdemo.util.WordsLoader;

public class EnglishStudyActivity extends AppCompatActivity {

    Button btn1, btn2, btn3, btn4,btn5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_english_study);

        btn1 = findViewById(R.id.btn1);
        btn2 = findViewById(R.id.btn2);
        btn3 = findViewById(R.id.btn3);
        btn4 = findViewById(R.id.btn4);
        btn5 = findViewById(R.id.btn5);

        // 研究生英语学习
        btn1.setOnClickListener(v -> {
            StudyIdeaListActivity.startMe(this, WordBean.WORD_LEVEL.POST_GRADUATE);
        });

        // 本科生英语学习
        btn2.setOnClickListener(v -> {
            WordsDetailActivity.startMe(this, WordsLoader.getSelLevelWords(EnglishStudyActivity.this,WordBean.WORD_LEVEL.COLLEGE_STUDENT, WordBean.STUDY_TYPE.NULL_TYPE));
        });

        // 四级学习
        btn3.setOnClickListener(v -> {
            WordsDetailActivity.startMe(this, WordsLoader.getSelLevelWords(EnglishStudyActivity.this,WordBean.WORD_LEVEL.CET4, WordBean.STUDY_TYPE.NULL_TYPE));
        });

        // 六级学习
        btn4.setOnClickListener(v -> {
            WordsDetailActivity.startMe(this, WordsLoader.getSelLevelWords(EnglishStudyActivity.this,WordBean.WORD_LEVEL.CET6, WordBean.STUDY_TYPE.NULL_TYPE));
        });

        // 其他单词学习
        btn5.setOnClickListener(v->{
            WordsDetailActivity.startMe(this, WordsLoader.getSelLevelWords(EnglishStudyActivity.this,WordBean.WORD_LEVEL.OTHER_LEVEL, WordBean.STUDY_TYPE.NULL_TYPE));
        });
    }
}